﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITraceFactory.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   A factory that creates <see cref="ITrace"/> instances.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
using System.Diagnostics.CodeAnalysis;

namespace AzureContrib.WindowsAzure.Diagnostics
{
	/// <summary>
	/// A factory that creates <see cref="ITrace"/> instances.
	/// </summary>
	public interface ITraceFactory
	{
		/// <summary>
		/// Use the type to log for as the name for the logger.
		/// </summary>
		/// <param name="toLogFor">The type to trace for</param>
		/// <returns>A fully loaded <see cref="ITrace"/></returns>
		ITrace Create(Type toLogFor);

		/// <summary>
		/// Enter a custom switch name for your logger instance.
		/// </summary>
		/// <param name="switch">The swich name</param>
		/// <returns>A fully loaded <see cref="ITrace"/></returns>
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "switch", Justification = "The name switch is the right name for this context wich is switching traceing at different levels.")]
		ITrace Create(string @switch);
	}
}